

<div class="hero-unit" background='#ddd'>
            <p><h1>Welcome to cake blog!</h1></p>
            <p>This is a blog use Cakephp and Twitter Bootstrap </p>
            
</div>
<?php echo '<p><a href="/cakephp/posts/add" class="btn btn-primary btn-large">Add new post &raquo;</a></p>'?>

<div class='container'>
    <?php $index = 0;?>
    <?php foreach ($posts as $post): ?>
    <?php if($index%2==0) echo'<div class="row-fluid">';?>
    <div class='span6' background='#ddd'>
        
        <h4>
            <?php echo $this->Html->link($post['Post']['title'], array('controller' => 'posts', 'action' => 'view', $post['Post']['id'])); ?>
        </h4>
        <p>
            <?php echo $post['Post']['body'];?>
        </p>
        <p>    
            <?php
                if($logged_in)
                 {
                  echo $this->Form->postLink(
                       'Delete',
                       array('action' => 'delete', $post['Post']['id']),
                       array('confirm' => 'Are you sure?'));
                  echo "  ";
                  echo $this->Html->link('Edit', array('action' => 'edit', $post['Post']['id']))   ; 
                  }  ?>
        </p>
        <p>
        <p class="muted"><small><?php echo $post['Post']['create_time']; ?></small></p>
        </p>
    </div>
    <?php $index=$index+1; if($index%2==0) echo'</div>';?>
    <?php endforeach; ?>
    <?php unset($post); ?>
</div>

